Skip to content

disagg: Disagg write filecache for compaction tasks (release-nextgen-20251011)#10940

Closed
JaySon-Huang wants to merge 19 commits into
pingcap:release-nextgen-20251011from
JaySon-Huang:ng_2510_disagg-write-filecache
Closed

disagg: Disagg write filecache for compaction tasks (release-nextgen-20251011)#10940
JaySon-Huang wants to merge 19 commits into
pingcap:release-nextgen-20251011from
JaySon-Huang:ng_2510_disagg-write-filecache

Conversation

@JaySon-Huang

Copy link
Copy Markdown
Contributor

manually cherry-pick of #10937

What problem does this PR solve?

Issue Number: close #xxx

Problem Summary:

What is changed and how it works?


Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

Initialize FileCache and register remote cache paths for disaggregated
storage nodes, and add dt_enable_write_filecache (default false) as the
runtime gate for upcoming write-side local staging.
Propagate an optional DMFileBlockInputStreamBuilder hook through
getPlacedStream and enable it from prepareMerge, prepareMergeDelta, and
prepareSplitPhysical when dt_enable_write_filecache is set.
Introduce collectMetaV2MergedFilesForLocalRead to map read columns to
deduplicated physical .merged S3 objects, with unit tests for noop,
column filtering, and remote MetaV2 dedup behavior.
Download deduplicated .merged S3 objects before building DMFileReader when
write FileCache local read is enabled, pin FileSegmentPtr for reader lifetime,
and fall back to direct read on per-object failures.
Replace ProfileEvents with tiflash_storage_write_filecache_staging counters
and staged-bytes counter, and update local staging unit tests accordingly.
Cover prepareMergeDelta, prepareMerge, and prepareSplitPhysical staging
paths in SegmentTestS3, and fix FileCache test teardown to re-init
S3FileCachePool so multiple gtests can run in one process.
Signed-off-by: JaySon-Huang <tshent@qq.com>
…logging

Instrument prepareMergeDelta/Merge/SplitPhysical and remote DMFile upload
with tiflash_storage_subtask_* metrics. Track remote upload duration in
createNewStable and log stable column count in Segment::info().
Return prepare/remote upload durations from prepareMerge and
prepareMergeDelta, and print them in segmentMerge/MergeDelta finish logs.
Track prepare and S3 upload durations in SplitInfo and print them in
segmentSplit finish logs. Move getPlacedStream above the gtest visibility
split in Segment.h.
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Pass DownloadType into downloadImpl and print it in Download success logs.
Collect large standalone `.dat` subfiles in addition to `.merged` blobs
when preparing write-side FileCache local reads, with unit test coverage.
Signed-off-by: JaySon-Huang <tshent@qq.com>
@ti-chi-bot ti-chi-bot Bot added do-not-merge/cherry-pick-not-approved release-note-none Denotes a PR that doesn't merit a release note. labels Jun 29, 2026
@ti-chi-bot

ti-chi-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

This cherry pick PR is for a release branch and has not yet been approved by triage owners.
Adding the do-not-merge/cherry-pick-not-approved label.

To merge this cherry pick:

  1. It must be LGTMed and approved by the reviewers firstly.
  2. For pull requests to TiDB-x branches, it must have no failed tests.
  3. AFTER it has lgtm and approved labels, please wait for the cherry-pick merging approval from triage owners.
Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ti-chi-bot

ti-chi-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign solotzg, yudongusa for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (3)
  • release-8.5
  • release-7.5
  • release-8.1

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8ef98088-7b96-4216-88ce-cdc7383cca0a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ti-chi-bot ti-chi-bot Bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Jun 29, 2026
Signed-off-by: JaySon-Huang <tshent@qq.com>
…te+mergeDeltaAll (pingcap#10898)

close pingcap#10897\n\nSigned-off-by: JaySon-Huang <tshent@qq.com>
@JaySon-Huang

Copy link
Copy Markdown
Contributor Author

close as not need

@JaySon-Huang JaySon-Huang deleted the ng_2510_disagg-write-filecache branch June 30, 2026 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/cherry-pick-not-approved release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant